package com.lagou.boot;

import com.lagou.client.RPCConsumer;
import com.lagou.service.IUserService;

public class ConsumerBoot {


    public static void main(String[] args) throws InterruptedException {

        //1.创建代理对象
        IUserService service = (IUserService) RPCConsumer.createProxy(IUserService.class);

        //2.循环给服务器写数据
        for(int i=1; i<=5; i++){
            String result = service.sayHello();
            System.out.println(result+i);
            Thread.sleep(2000);
        }

    }
}
